package com.xsf.pay.service.impl;


import org.springframework.security.core.userdetails.User;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.core.userdetails.UsernameNotFoundException;
import org.springframework.stereotype.Service;

import java.util.Collections;

/**
 * @author 许剑峰
 */
@Service
public class UserDetailsServiceImpl implements UserDetailsService {


    @Override
    public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException {
//
//        if (qggUser == null) {
//            throw new UsernameNotFoundException("User not found with username: " + username);
//        }
        return User.builder()
//                .username(qggUser.getUserName())
//                .password(qggUser.getPassword())
//                .disabled(DelFlagEnum.DELETED.getCode().equals(qggUser.getDeleteFlag()))
//                .accountLocked(LockFlagEnum.LOCK.getCode().equals(qggUser.getLockFlag()))
                .authorities(Collections.emptyList())
                .build();
    }
}
